from transformers import pipeline

def semantic_entailment(original_text, summary_text):
    # 加载NLI模型
    nli_pipeline = pipeline("text-classification", model="bart-large-mnli")
    result1 = nli_pipeline([{"text": original_text, "text_pair": summary_text}])
    result2 = nli_pipeline([{"text": summary_text, "text_pair": original_text}])
    return result1[0], result2[0]